package com;

import java.util.Scanner;

/**
 * @ClassName MyVolume
 * @Description 主类
 * @Author shenrui
 * @Date 2021/9/11
 */
public class MyVolume {
    /**
     * @Author shenrui
     * @Date 2021/9/11
     */
    public static void main(String[] args) {
        int[] heightList;
        int volume;
        MaxVolume maxVolume = new MaxVolume();
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        // 规范里说这里需要做最后一个分隔符后有无内容的检查，但我们这里只需要有具体数字的，所以不做检查
        String[] arr = str.split(",");
        heightList = new int[arr.length];
        for (int j = 0; j < heightList.length; j++) {
            heightList[j] = Integer.parseInt(arr[j]);
        }
        volume = maxVolume.compute(heightList,heightList.length - 1);
        System.out.println(volume);

    }
}
